home *** CD-ROM | disk | FTP | other *** search
/ Aminet 6 / Aminet 6 - June 1995.iso / Aminet / comm / misc / RSP37_5.lha / RShell-Protector.doc < prev    next >
Encoding:
Text File  |  1995-03-17  |  6.7 KB  |  154 lines

  1. rshell-protector.doc
  2.  
  3.  INTRODUCTION
  4. As a sysop or networking-fan you are lucky if the following never
  5. happened to you:
  6. Some Cosys logs in, enters the shell to search a file and
  7. accidentially starts a GUI-driven program that's not
  8. self-detaching. POOF! Your BBS hangs! If you are at home - fine.
  9. If you aren't, your system will be down for a long time.
  10. Ever tried the same thing under X11? If you start a GUI-driven
  11. program from a local shell - no problem. If you try it via a
  12. telnet link (and don't specify any "-display" parameters) it
  13. just says "Can't open display!" and exits.
  14. This is what RShell-Protector achieves on the Amiga.
  15.  
  16.  REQUIREMENTS
  17. RShell-Protector makes use of environment variables and therefore
  18. requires OS2.04. To get everything out of the program you should have a
  19. modem or network. In other words, if you don't have either this program is
  20. of absolutely no use for you. But you could install it anyway, some
  21. Lunkwill'n'Skywalkerization of your system won't hurt 8^)))
  22.  
  23.  INSTALLATION/USAGE
  24. The "rshell-protector" executable is intended to be run as a
  25. background task in the user-startup script. The install-script
  26. included in this archive should perform all necessary changes for
  27. you. The program patches intuition.library and then hangs in the
  28. background, waiting for a Ctrl-C signal. If you ever want to
  29. remove the patches, just use "break <processnumber> c". No fancy
  30. (and illegal) patching routines are used so RShell-Protector will
  31. work fine with SaferPatches.
  32. As only parameter RShell-Protector takes the name of a local
  33. variable which is set in shells that should be protected.
  34. E.g. in the shell-startup script use:
  35.  set RSHELL-PROTECTOR 1
  36. and that shell will be protected.
  37. Programs started from this process (and their children which inherit
  38. local variables) will fail to open any window or screen. Using
  39. the "set" and "unset" commands you can switch between "protected"
  40. and "unprotected" while the shell is running.
  41. There might be programs which don't care if intuition returns
  42. NULL on an OpenScreen()/OpenWindow() call. They will render into
  43. an invalid rastport and crash. The best place for such programs
  44. is your trashcan.
  45.  
  46.  CNET BBS INSTALLATION
  47. When running a network with remote-logins you will most likely
  48. have some kind of rlogin-startup script, which you don't have for
  49. the BBS shell in CNet. Let's change that:
  50. Load CNet's "bbstext" file into your favourite editor and move to
  51. line #632 where you can find a newshell-command and some options
  52. for the FIFO: handler. Just change the end of the line from
  53. "from S:shell-startup" to something like
  54. "from s:CNetShell-Startup" and save the file.
  55. Create a file called "CNetShell-Startup (or however you called
  56. it) in your s: directory. It should contain at least:
  57.  execute s:shell-startup
  58.  set RSHELL-PROTECTOR 1
  59. and maybe some other tools/patches that you want to use from the
  60. BBS shell only (ReqOff and the like). Now select "text/menu reload"
  61. from CNet's menu and you're done.
  62.  
  63.  INSTALLATION ON OTHER BBS-PROGRAMS
  64. Sorry, can't tell you much about this - you have to find out
  65. yourself. Using SnoopDos will help! For DLG the installation
  66. should be similar to CNet, AFAIK the command to call when opening
  67. a shell is also configurable through a textfile.
  68.  
  69.  TECHNICAL INFO/COMPATIBILITY
  70. RShell-Protector patches the following intuition-functions:
  71.  OpenScreen()
  72.  OpenWindow()
  73.  OpenScreenTagList()
  74.  OpenWindowTagList()
  75. On every call to these functions it checks for the environment
  76. variable specified for patching. If there is no such variable
  77. the original function is called. Otherwise an error-message is
  78. printed on stdout and zero returned, which means "failure" to the
  79. calling program.
  80. Unlike previous versions V37.4+ *does* check if the patch was called
  81. from a task or from a process and, in case of a task, does not call
  82. any dos.library functions which would be illegal.
  83. Thanks to Giuseppe Sacco for explaining how to distinguish between
  84. tasks and processes!
  85.  
  86. RShell-Protector has been tested on:
  87. A4000/040, OS3.0 & OS3.1, 12MB RAM, Fastlane, Merlin
  88. A4000/030, OS3.0 & OS3.1, 22MB RAM, GVP-II, Merlin, MFC-2, CNet/3
  89. A2000, A2630, OS3.1, 7MB RAM, Mastercard, MFC-2, CNet/3
  90. No 68030 or OS3.0+ specific features are used so it should also
  91. run on the 68000 and with OS2.04.
  92.  
  93.  BUGS
  94. Returncode is always 0, no matter if the patching succeeded or
  95. not. If this annoys you, fix it.
  96.  
  97.  COPYLEFT
  98. RShell-Protector is copylefted software. Do with it whatever you
  99. like. The sourcecode in asm is included so you can hack around
  100. with it. (From V37.4 on we used PhxAss (oops, still unreg., sorry!)
  101. because AsmOne doesn't like Motorola's new asm syntax :-( )
  102. The only thing you must not do is redistribute hacked-up versions
  103. with our names in them - or thou shalt be marked a lamer forever!
  104. If you implement any improvements, please let us know. See below
  105. for addresses.
  106.  
  107.  AUTHORS
  108. If you can't find us on IRC, send comments, flames etc. to:
  109. Usenet:   Matthias.Bethke@mni.fh-giessen.de
  110. AmigaNet: Lunkwill@39:176/208.0
  111.           Skywalker@39:176/208.3
  112.  
  113. Call these BBSs:
  114. Sweet Dreams - +49-6404-61539 (Line 1, ZyXEL 19k2, 24h)
  115.                +49-6404-65106 (Line 2, ZyXEL 16k8, 22-15h)
  116. Thunder Dome - +49-6408-3249  (Line 1, ZyXEL 19k2, 24h)
  117.                +49-6408-3779  (Line 2, ZyXEL 19k2, 22-13h)
  118.  
  119.  
  120.  HISTORY
  121. V37.5, 17-03-95
  122. - some optimization of existing code (oh really? :) )
  123. - replaced the "usage: ..." errormessage with a PrintFault()
  124.   this is both shorter and localized.
  125. - reduced the delay before exiting to 0.2s (should be sufficient...)
  126. - got executable 44 bytes shorter again 8>>>
  127. V37.4, 23-02-95, floating around on some BBSs but not on AmiNet
  128. - tried to optimize it for 020+, without much success 8->
  129.   what remains is the new asm syntax - it still runs on 68000.
  130. - made the patch 100% system conforming (if no bugs are left...) by:
  131.   a) avoiding calls to dos.library when the code was called from a
  132.      task
  133.   b) adding 1s delay before exit to make sure every task has exited
  134.      from the patch code. Just for completeness... :)
  135. - squeezed some more bytes out of the executable so despite the
  136.   additional code the program is 44 bytes shorter than V37.3. Code got
  137.   pretty wierd in places... (size fanatics? us? noooo...never!)
  138. - resisted the temptation to fill up some of the 44 bytes with a
  139.   "MagicCX SUXXX!" message. But as this message is real important it
  140.   got into the dox.
  141. V37.3, 18-11-94
  142. - removed some bogus code and useless variables from earlier test-versions
  143. - uses much less stack because only the necessary regs are saved inside the
  144.   functions, not the whole register file.
  145. V37.2, 10-11-94, unreleased
  146. - The env-variable's name is now selectable via commandline. So
  147.   you can save the "set RSHELL-PROTECTOR 1" in the shell-startup if
  148.   you run AUSH which has a variable called "remote" by itself.
  149. - Some stupid sourcecode dox
  150. V37.1, 23-10-94, initial release
  151.  
  152.  FUTURE
  153. Maybe a WB emulation using RIP-term...? :^)
  154.